import { http } from '@/utils/http'
import IndexDB from '@/utils/indexDB'
let airbnbDB = new IndexDB('airbnb')

export function getRoomList() {
  return http.httpGet('', {})
}
// mock 接口
export async function fetchRoom() {
  await airbnbDB.openStore('room', 'id', ['nose', 'ear'])
  const result = await airbnbDB.getAllItem('room').then((res) => {
    return {
      code: '000',
      message: '操作成功',
      result: res,
      success: true
    }
  })
  return result
}
